﻿using System;
using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IPensioner
    {
        [OperationContract]
        DataSet Pensioner_GetAll();

        [OperationContract]
        DataSet Pensioner_DeNghiTroCap_OmDau(int BranchID, int _month, int _year, int _grantid, int _subgrantid);

        [OperationContract]
        DataSet Pensioner_DeNghiTroCap_SauOmDau(int BranchID,int _month, int _year);

        [OperationContract]
        DataSet Pensioner_DeNghiTroCap_SauThaiSan(int BranchID,int _month, int _year);

        [OperationContract]
        DataSet Pensioner_DeNghiTroCap_SauTNLDBNN(int BranchID,int _month, int _year);

        [OperationContract]
        DataSet Pensioner_DeNghiTroCap_ThaiSan(int BranchID,int _month, int _year, int grantid, int _subgrantid);

        [OperationContract]
        PensionerInfo Pensioner_GetInfo(int PensionerID);

        [OperationContract]
        DataSet Pensioner_GetList(out int ItemCount, int currentPage, int pageSize, int branch_ID, int DepartmentID, int month, int year);

        [OperationContract]
        int Pensioner_Insert(PensionerInfo eInfo);

        [OperationContract]
        bool Pensioner_Update(PensionerInfo eInfo);

        [OperationContract]
        bool Pensioner_Delete(int PensionerID);
    }
    [DataContract(Namespace = "http://HRMService")]
    public class PensionerInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }

        int _GrantID;
        [DataMember]
        public int GrantID
        {
            get { return _GrantID; }
            set { _GrantID = value; }
        }

        int _SubGrantID;
        [DataMember]
        public int SubGrantID
        {
            get { return _SubGrantID; }
            set { _SubGrantID = value; }
        }

        int _EmployeeID;
        [DataMember]
        public int EmployeeID
        {
            get { return _EmployeeID; }
            set { _EmployeeID = value; }
        }

        int _DepartmentID;
        [DataMember]
        public int DepartmentID
        {
            get { return _DepartmentID; }
            set { _DepartmentID = value; }
        }

        int _BranchID;
        [DataMember]
        public int BranchID
        {
            get { return _BranchID; }
            set { _BranchID = value; }
        }

        int _AtHome;
        [DataMember]
        public int AtHome
        {
            get { return _AtHome; }
            set { _AtHome = value; }
        }

        int _Concentrate;
        [DataMember]
        public int Concentrate
        {
            get { return _Concentrate; }
            set { _Concentrate = value; }
        }

        int _InTime;
        [DataMember]
        public int InTime
        {
            get { return _InTime; }
            set { _InTime = value; }
        }

        int _Inherit;
        [DataMember]
        public int Inherit
        {
            get { return _Inherit; }
            set { _Inherit = value; }
        }

        decimal _Amount;
        [DataMember]
        public decimal Amount
        {
            get { return _Amount; }
            set { _Amount = value; }
        }

        string _Description;
        [DataMember]
        public string Description
        {
            get { return _Description; }
            set { _Description = value; }
        }

        DateTime _Date;
        [DataMember]
        public DateTime Date
        {
            get { return _Date; }
            set { _Date = value; }
        }

        decimal _DeclineLevel;
        [DataMember]
        public decimal DeclineLevel
        {
            get { return _DeclineLevel; }
            set { _DeclineLevel = value; }
        }

        string _StateParturition;
        [DataMember]
        public string StateParturition
        {
            get { return _StateParturition; }
            set { _StateParturition = value; }
        }

        int _InheritFoetus;
        [DataMember]
        public int InheritFoetus
        {
            get { return _InheritFoetus; }
            set { _InheritFoetus = value; }
        }

        string _ConditiontoWork;
        [DataMember]
        public string ConditiontoWork
        {
            get { return _ConditiontoWork; }
            set { _ConditiontoWork = value; }
        }
        string _InsuranceTime;
        [DataMember]
        public string InsuranceTime
        {
            get { return _InsuranceTime; }
            set { _InsuranceTime = value; }
        }

        decimal _Salary;
        [DataMember]
        public decimal Salary
        {
            get { return _Salary; }
            set { _Salary = value; }
        }
        DateTime _FromDate;
        [DataMember]
        public DateTime FromDate
        {
            get { return _FromDate; }
            set { _FromDate = value; }
        }
        DateTime _ToDate;
        [DataMember]
        public DateTime ToDate
        {
            get { return _ToDate; }
            set { _ToDate = value; }
        }
        decimal _BasicSalary;
        [DataMember]
        public decimal BasicSalary
        {
            get { return _BasicSalary; }
            set { _BasicSalary = value; }
        }
        decimal _AVGAmount;
        [DataMember]
        public decimal AVGAmount
        {
            get { return _AVGAmount; }
            set { _AVGAmount = value; }
        }
        decimal _Rate;
        [DataMember]
        public decimal Rate
        {
            get { return _Rate; }
            set { _Rate = value; }
        }

        int _ChildNumber;
        [DataMember]
        public int ChildNumber
        {
            get { return _ChildNumber; }
            set { _ChildNumber = value; }
        }
        DateTime _DateOfBirth;
        [DataMember]
        public DateTime DateOfBirth
        {
            get { return _DateOfBirth; }
            set { _DateOfBirth = value; }
        }
    }
}
